package com.ys.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

/**
 * <p>
 * 冲币表
 * </p>
 *
 * @author zpf
 * @since 2018-03-26
 */
@Data
@TableName("wallet_deposit")
public class WalletDeposit extends Model<WalletDeposit> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 租户Id,保留字段，默认1
     */
    @TableField("tenantId")
    private Integer tenantId;
    @TableField("depositFromAddress")
    private String depositFromAddress;
    @TableField("depositToAddress")
    private String depositToAddress;
    /**
     * 冲币金额小数
     */
    @TableField("depositAmount")
    private BigDecimal depositAmount;
    /**
     * 冲币金额整数
     */
    @TableField("depositInt")
    private BigInteger depositInt;
    private BigInteger gas;
    @TableField("gasPrice")
    private BigInteger gasPrice;
    @TableField("blockNum")
    private Integer blockNum;
    @TableField("blockHash")
    private String blockHash;
    @TableField("txHash")
    private String txHash;
    @TableField("txTime")
    private String txTime;
    private Integer currency;
    @TableField("currencyChainType")
    private Integer currencyChainType;
    /**
     * 0：  未打包 
        10：已打包
        20：已完成
     */
    private Integer status;
    /**
     * 确认的块数
     */
    @TableField("blockHeight")
    private Integer blockHeight;
    @TableField("jsonData")
    private String jsonData;


    @TableField("inputDate")
    private Date inputDate;
    @TableField("editDate")
    private Date editDate;



    private String data;
    private String nonce;
    private String transactionIndex;
    /**
     * 归集状态
     * -1 余额满足
     * 0 准备归集
     * 10 正在归集
     * 20 已归集
     */
    private Integer gatherStatus;
    /**
     * 冲币地址账户余额
     */
    private BigInteger balance;





    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
